{extend name="index@common/base"/}
{block name="style"}
<link rel="stylesheet" href="__CSS__/warning/evaluation.css" media="all">
{/block}
{block name="body"}
<div class="layui-body layui-tab-content index-body" id="cont">
    <div class="park-navigation">
        <div class="navigation-icon">
            <i class="fa {$breadCrumb[0]['icon']}"></i>
        </div>
        <div class="navigation-menu">
            <h2>{$breadCrumb[0]['title']}</h2>
            {if isset($breadCrumb[1])}
            <p>{$breadCrumb[0]['remark']}</p>
            {/if}
        </div>
    </div>
    <div class="park-content" id="page-summary">
        <div class="content-title">
            <div class="title col-8">
                <h3>风险评估</h3>
                <form class="layui-form" action="{:url('warning/evaluation/index')}" onsubmit="return false;">
                    <select name="enterpriseId" lay-filter="enterprise">
                        {volist name="enterpriseList" id="item"}
                        <option value="{$key}">{$item}</option>
                        {/volist}
                    </select>
                </form>
            </div>
            <div class="tool col-2">
            	<button id="scoring" data-url="{:url('warning/evaluation/autoScoring')}"><i class="fa fa-edit"></i></button>
				<button id="send"><i class="fa fa-send"></i></button>
            </div>
        </div>
        <div class="layui-content">
            <div class="layui-content" id="evaluation_view" data-url="{:url('warning/evaluation/index')}" data-template="#evaluationTemplate">
            </div>
        </div>
    </div>
</div>
{/block}
{block name="script"}
<script type="text/javascript" src="__JS__/warning/standards.js"></script>
<script type="text/javascript" src="__JS__/warning/evaluation.js"></script>

<script type="text/html" id="evaluationTemplate">

    <div class="maintab evaluation-table">
		<form class="layui-form" lay-filter="scoring" action="{{d.url}}" method="post">
        	<table>
				<thead>
					<tr>
						<th>评分标准</th>
						<th>评分</th>
						<th style="text-align:center;">参考标准</th>
					</tr>
				</thead>
            	<colgroup>
               		<col width="20%">
                	<col width="40%">
                	<col width="20%">
            	</colgroup>
				<tbody>
            	{{# for(var i = 0;i < d.info.length; i++){ }}
            		<tr style="height:60px;">
                		<th class="collapse">{{d.info[i].title}}（{{d.info[i].name}}）</th>
                		<th>
                			<div class="layui-input-block">
					  		<select name="{{d.info[i].name}}" lay-search="" {{d.info[i].disabled}}>
								{{# for(var j = 0;j < d.info[i].scoring.length; j++){ }}
									{{# if(d.info[i].grade == d.info[i].scoring[j]){ }}
									<option value="{{d.info[i].scoring[j]}}" selected>{{d.info[i].scoring[j]}}</option>
									{{# }else{ }}
									<option value="{{d.info[i].scoring[j]}}">{{d.info[i].scoring[j]}}</option>
									{{# } }}
								{{# } }}
					  		</select>
                    		</div>
                		</th>
						<th style="text-align:center;">
                    		<a class="layui-btn btn-del evaluation-standard" id="{{d.info[i].name}}"><i class="fa fa-file-text"></i></a>
                		</th>
            		</tr>
            	{{# } }}
            	</tbody>
        	</table>
		</form>
    </div>
</script>

{/block}



